{template "content","head","sysx_m"}
<style>
    .right_main iframe{width:90% !important;}
</style>


<div class="bg pad15">
    <div class="nytitle"><a href="/" target="_blank">首页</a> >
        {catpos($catid,$s='>')}
    </div>
    <div class="nytitle" style="background: none;color:#fff;height: auto;margin-left:auto;padding: 0 2% 1% 2%">
        {pc:content action="category" catid="4" order="listorder asc"}
        {loop $data $r}
        <a  href="{$r[url]}" class="layui-btn layui-btn-mini" style="display:inline-block;width:24%;color:#fff;background:#ccc;margin-top: 5px;margin-left:0 !important;{if $catid==$r[catid]}background-color:#2f82ff;color:#fff{/if}">{$r[catname]}</a>
        {/loop}
        {/pc}
    </div>
    <div class="right_main" style="width: 100%;padding:20px 5%;margin:auto;background:#fff;">
        <div class="agent_con">
            <div class="neirong">
                <p style="font-size: 25px;margin-top: 10px;color:#004693">在线留言</p>
                <div class="nei">
                    <form class="layui-form" id="form" action="index.php?m=webman&c=liuyan&a=add" method="post">
                        <table class="layui-table">
                            <tr class="layui-input-inline">
                                <td style="width: 100px">姓名：</td>
                                <td><input class="layui-input" name="username" type="text"></td>
                            </tr>
                            <tr class="layui-input-inline" style="display: block">
                                <td style="width: 100px">手机号码：</td>
                                <td><input class="layui-input" name="phone" type="text"></td>
                            </tr>
                            <tr class="layui-input-inline" style="display: block">
                                <td style="width: 100px">QQ号码：</td>
                                <td><input class="layui-input" name="qq" type="text"></td>
                            </tr>
                            <tr class="layui-input-inline">
                                <td style="display: block"><textarea class="layui-textarea" name="content" placeholder="请留下您的需求，谢谢" id="" cols="60" rows="8"></textarea></td>
                            </tr>
                            <tr>
                                <td>验证码：<input type="text" name="code" class="layui-input" style="width: 100px">{form::checkcode('code_img', '4', '14', 100, 30)}</td>

                            </tr>
                            <tr class="layui-input-block" style="width: 200px!important;">
                                <input type="hidden" name="dosubmit" value="1">
                                <input type="hidden" name="ip" value="{ip()}">
                                <td style="border: none;"><button type="button" class="layui-btn btn" style="background-color:#2f82ff;">提交</button></td>
                            </tr>

                        </table>
                    </form>
                </div>
            </div>
            <script>
                layui.use('layer',function(){
                    var layer=layui.layer;
                    $(".btn").click(function () {
                        $.ajax({
                            url:"index.php?m=webman&c=liuyan&a=add",
                            type:"post",
                            data:$("#form").serialize(),
                            success:function(msg){
                                if(msg=='ok'){
                                    alert('提交成功，谢谢！');
                                    location.reload()
                                }else if(msg=='fail'){
                                    alert('提交失败，请联系管理员',{icon:2});
                                }else{
                                    alert(msg,{icon:2})
                                }
                            }
                        })
                    });

                })
            </script>
            <style>
                .layui-input-inline{
                    width:100%;
                }
            </style>
        </div>
    </div>

    {template "content","tj_news","sysx_m"}
    {template "content","tj_pro","sysx_m"}
    {template "content","foot","sysx_m"}